﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using XRM.Solutions.FrameworkSample.Common.Entities;
using XRM.Framework.Test.Integration;

namespace XRM.Solution.FrameworkSample.IntegrationTests.Workflow
{
    [TestClass]
    public class TestCreditCheck : WFActivityIntegrationTest
    {
        #region Do

        [TestMethod]
        public void TestReturnsResult()
        {
            base.Test();
        }

        #endregion
        
        #region Setup

        protected override Guid SetupPrimaryEntity()
        {
            Contact contact = new Contact();
            contact.FirstName = "New";
            contact.LastName = "Customer";
            contact.BirthDate = new DateTime(1984, 12, 12);

            return OrganizationService.Create(contact);
        }

        #endregion

        #region Verify

        protected override void VerifyStatus()
        {
            Assert.AreEqual(AsyncStatus.Pass, Status);
        }

        #endregion
    }
}
